package com.xdkj.es.entiti;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author joke
 * @version 1.0
 * @date 2021/12/19-18:46
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "jdgoods", createIndex = false, shards = 5, replicas = 1)
public class JDGoods implements Serializable {
    @Id
    private String id;
    @Field(name = "img", type = FieldType.Keyword)
    private String img;
    @Field(name = "title", type = FieldType.Text, analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String title;
    @Field(name = "price", type = FieldType.Text)
    private String price;
    @Field(name = "publish", type = FieldType.Keyword)
    private String publish;
}
